package Test1;

/**
 *类class WuMingFen
 * String theMa 粉的分量(两) int quantity 是否带汤 boolean likeSoup
 */
public class Question7 {

    private String theMa;
    private int quantity;
    private boolean likeSoup;

    public Question7(String theMa,int quantity,boolean likeSoup){
        this.theMa=theMa;
        this.quantity=quantity;
        this.likeSoup=likeSoup;
    }


    public Question7(String theMa,int quantity){
        this.theMa=theMa;
        this.quantity=quantity;
    }

    public Question7(String theMa,boolean likeSoup,int quantity) {
        this.theMa = theMa;
        this.quantity = quantity;
        this.likeSoup = likeSoup;
        if (likeSoup == true) {
            String b1 = "带汤的";
            System.out.println(theMa+" "+quantity+"两 "+b1);
        }
    }

    public void check(){
        if (likeSoup==true){
            String b1="带汤的";
            System.out.println("面码: " + theMa  + "\n分量 " + quantity + "\n" + b1);
        }else
        {
            String b1="不带汤的";
            System.out.println("面码："+theMa+"\n分量"+quantity+"\n"+b1);
        }
    }

    public static void main(String[] args) {
        Question7 q7=new Question7("沙茶面",2,true);
        Question7 q77=new Question7("沙茶面",true,2);
        q7.check();
    }
}
